# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=fatback
pkgver=1.3
pkgrel=1
pkgdesc='A *nix tool for recovering files from FAT file systems.'
arch=('x86_64' 'aarch64')
url='http://fatback.sourceforge.net/'
groups=('blackarch' 'blackarch-forensic')
license=('GPL')
depends=('glibc')
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz")
sha512sums=('be76a40eb981e3d33730811e846fc4fce6c6e4a7833ef37076d14da62e0741490b566bc17a4268f0861e004088493eb3e0d36771f4c7aa9bf7e765e5a0a65d82')

build() {
  cd "$pkgname-$pkgver"

  ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info

  sed -i 's/-Doff_t=long -Dpid_t=int -Dsize_t=unsigned//' Makefile
  sed -i 's/LDFLAGS = /LDFLAGS = -lfl/g' Makefile

  make
}

package() {
  cd "$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install
}

